package good.idea.data.excel.domain;

import lombok.Data;
import good.idea.data.excel.call.DataLoadChannel;

import java.util.HashMap;
import java.util.Map;

/**
 * @author chm
 */
@Data
public class SheetDataChannel {

    private Map<String, DataLoadChannel> dataLoadChannelMap = new HashMap<>();

    public SheetDataChannel addDataLoadChannel(String key, DataLoadChannel dataLoadChannel) {
        dataLoadChannelMap.put("${" + key + "}", dataLoadChannel);
        return this;
    }

    public SheetDataChannel addDataLoadChannel(DataLoadChannel dataLoadChannel) {
        dataLoadChannelMap.put(String.valueOf(dataLoadChannelMap.size()), dataLoadChannel);
        return this;
    }


}
